package com.project.mapper;

import com.project.bean.ManBean;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;

public interface IManMapper {
    @Insert("insert into t_man(m_name,m_birthday) values(#{name},#{birthday})")
    public void add(ManBean manBean);
    @Delete("delete from t_man where pk_manId=#{id}")
    public void del(int id);
    @Update("update t_man set m_birthday=#{birthday} where pk_manId=#{id}")
    public void update(@Param("id") int id, @Param("birthday") LocalDate birthday);
    @Select("select * from t_man")
    @ResultMap("manMap")
    public List<ManBean> findAll();
}
